#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void) {
    int N, m, t, d;
    double sum = 0.0;
    scanf("%d", &N);
    m = 1, d = 1;
    for (int i = 1; i <= N; i++) {
        t = d * m;
        sum += 1.0 / t;
        m += 3;
        d = -d;
    }
    printf("sum = %.3f", sum);
    return 0;
}